import { createRouter,createWebHashHistory } from 'vue-router';

import MainRouter from '../components/MainRouter.vue'
let routes = [
  {
    path: "/",
    name: "首页",
    redirect: '/test',
    component: () => import("../views/layout/index.vue"),
    children: [
      {
        path: '/test',
        name: '测试',
        redirect: '/test/todo',
        component: MainRouter,
        children: [
          {
            path: '/test/todo',
            name: 'todo',
            component: () => import('../views/test/todo.vue'),
          },
          {
            path: '/test/test1',
            name: 'test1',
            component: () => import('../views/test/test1.vue'),
          }
        ]
      }
    ]
  }
];

const router = createRouter({
  history: createWebHashHistory(),
  routes,
})

export default router;

